package com.banksystem.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.banksystem.entity.Member;
import com.banksystem.entity.News;


public interface Membermapper {

	@Select("insert into member (name,sex,classs,phone,gname,position) values (#{name},#{sex},#{classs},#{phone},#{gname},#{position})")
	public void addcya(@Param("name")String name,@Param("sex")String sex,@Param("classs")String classs ,@Param("phone")String phone,@Param("gname")String gname,@Param("position")String position);
	
	@Select("select * from member where gname=#{gname}")
	public List<Member> findmemberAll(@Param("gname")String gname);
	
	@Delete("delete from member where mid=#{mid}")
	public void deletemember(@Param("mid")String mid);
	
	@Select("select * from member where gname like'%${gname}%' and ( gname like'%${seach}%' or name like'%${seach}%' or mid like'%${seach}%' or sex like'%${seach}%' or classs like'%${seach}%' or phone like'%${seach}%' or position like'%${seach}%')")
	public List<Member> findMemberAlllike(@Param("seach")String seach,@Param("gname")String gname);
}
